import java.util.Observable;

public class CopterInfo extends Observable{
	private static CopterInfo ci = null;
	private String state = "";
	private long responseTime = 0;
	private boolean ayt = false;
	private double roll= 0,pitch = 0,yaw = 0;
	
	private CopterInfo(){
		
	}
	
	public String getState(){
		return state;
	}
	
	public long getResponseTime(){
		return responseTime;
	}
	
	public double getRoll(){
		return roll;
	}
	
	public double getPitch(){
		return pitch;
	}
	
	public double getYaw(){
		return yaw;
	}
	
	public boolean getAYT(){
		return ayt;
	}
	
	public void addObserver(Class obs){
		addObserver(obs);
	}
  
	public void setGyros(double roll, double pitch, double yaw){
		this.roll = roll;
		this.pitch = pitch;
		this.yaw = yaw;
		setChanged();
		notifyObservers();
	}
	
	public void setState(String state){
		this.state = state;
		setChanged();
		notifyObservers();
	}
	
	public void setResponseTime(long responseTime){
		this.responseTime = responseTime;
		setChanged();
		notifyObservers();
	}
	
	public void setAYT(boolean AYT){
		this.ayt = AYT;
	}
	
	public static CopterInfo getCI(){
		if(ci == null)	ci = new CopterInfo();
		return ci;
	}
	
}